package cate.game.admin.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBAdmin;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "GM菜单の请求")
public class MenuReq implements MsgInput {
    @NoteField(value = "是否获取原文", detail = "必传")
    public boolean isOriginal;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        MenuResp resp = new MenuResp(game.admin.getMenus2(isOriginal));
        cc.sendNow(resp);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBAdmin.MENU_REQ;
    }
}
